 <!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />

        <!-- Base Css Files -->
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/jqueryui/ui-lightness/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/fontello/css/fontello.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/animate-css/animate.min.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/nifty-modal/css/component.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/magnific-popup/magnific-popup.css" rel="stylesheet" /> 
        <link href="__PUBLIC__/statics/coco-chat/assets/css/style.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/statics/coco-chat/assets/css/style-responsive.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/pace/pace.css" rel="stylesheet" />
        <link href="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/styles/metro/notify-metro.css" rel="stylesheet" type="text/css" />
		<link href="__PUBLIC__/statics/coco-chat/assets/libs/jquery-icheck/skins/all.css" rel="stylesheet" />
		<link href="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-select/bootstrap-select.min.css" rel="stylesheet" type="text/css" />

		<!-- Custom Css Files -->
        <link href="__HOME_CSS__/style.css"  rel="stylesheet" />
    </head>
	<!--ondragstart="window.event.returnValue=false" oncontextmenu="window.event.returnValue=false" onselectstart="event.returnValue=false"-->
    <body ondragstart="window.event.returnValue=false" oncontextmenu="window.event.returnValue=false" onselectstart="event.returnValue=false">
	<!-- Begin page -->
	<div>
		<div class="sub-header-title">
			<h2>请确认信息并进行支付</h2>
		</div>
		<div class="form-horizontal">
			<div class="form-group">
				<label class="col-sm-2 control-label">支付订单号</label>
				<div class="col-sm-5">
					<p class="help-block">{$order_no}</p>
				</div>
				<div class="col-sm-5">
					<p class="help-block"></p>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">标题</label>
				<div class="col-sm-5">
					<p class="help-block">{$goods_title}</p>
				</div>
				<div class="col-sm-5">
					<p class="help-block"></p>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">描述</label>
				<div class="col-sm-5">
					<p class="help-block">{$goods_body}</p>
				</div>
				<div class="col-sm-5">
					<p class="help-block"></p>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">金额</label>
				<div class="col-sm-5">
					<p class="help-block">{$amount}</p>
				</div>
				<div class="col-sm-5">
					<p class="help-block"></p>
				</div>
			</div>


			<if condition="$shtml" >
				<div class="form-group" id="wyzf">
					<label class="col-sm-2 control-label">网银支付</label>
					<div class="col-sm-10">
						<p class="help-block">{$shtml}</p>
					</div>
				</div>
			<else />
				<if condition="$bankList" >
					<form role="form" id="config_form" class="form-horizontal" action="{:U('Cash/bindCard')}">
						<div class="form-group">
							<label class="col-sm-2 control-label">快捷支付</label>
							<div class="col-sm-10">
								<volist name="bankList" id="vo" key="k">
									<div class="radio iradio">
										<label>
											<input type="radio" name="card" id="optionsRadios1" value="{$vo['id']}" <if condition="$k eq 1">checked</if> >
											{$vo.bank}  {$vo.bank_no} <if condition="$vo['cert_type'] eq 0">储蓄卡 <else /> 信用卡</if>
										</label>
									</div>
								</volist>
								<br>
								<p><i class="fa fa-plus"></i><a href="{:U('Cash/addDebit',array('payId'=>$payId))}">添加快捷支付</a></p>
							</div>
						</div>
						<div class="form-group">
							<input type="hidden" name="payId" value="{$payId}">
							<input type="hidden" name="password" value="">
							<div class="col-sm-offset-4 col-sm-4">
								<button type="submit" class="btn btn-success">快捷支付</button>
							</div>
						</div>
					</form>
					<else/>
					<div class="form-group" >
						<label class="col-sm-2 control-label">快捷支付</label>
						<div class="col-sm-10">
							<p>您还没有快捷支付绑定,请点击下面链接添加</p>
							<br>
							<p><i class="fa fa-plus"></i><a href="{:U('Cash/addDebit',array('payId'=>$payId))}">添加快捷支付</a></p>
						</div>
					</div>
				</if>
			</if>
		</div>


		<div class="clearfix"></div>
	</div>
	<!-- End of page -->
	
	<!-- Base Js Files -->
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery/jquery-1.11.1.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap/js/bootstrap.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jqueryui/jquery-ui-1.10.4.custom.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-ui-touch/jquery.ui.touch-punch.min.js"></script>
 	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-detectmobile/detect.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/fastclick/fastclick.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-slimscroll/jquery.slimscroll.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/nifty-modal/js/classie.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/nifty-modal/js/modalEffects.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/notify.min.js"></script>
    <script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-notifyjs/styles/metro/notify-metro.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/pace/pace.min.js"></script>

	<script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-validator/js/bootstrapValidator.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/jquery-icheck/icheck.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-select/bootstrap-select.min.js"></script>
	<script src="__PUBLIC__/statics/coco-chat/assets/libs/bootstrap-select2/select2.min.js"></script>

	<!-- Custom Js Files -->
	<script src="__HOME_JS__/common.js"></script>
	<!-- Custom Js Files -->
	<script src="__PUBLIC_JS__/sha1.js"></script>
	<script>
		$(".button_p2p").addClass("btn btn-success");
		//表单验证
		$('#config_form').bootstrapValidator({
			message: '',
			trigger: 'blur',
			excluded: [':disabled'],
			submitHandler: function(validator, form, submitButton) {
				window.parent.layer.prompt({
					title: '敏感操作:请输入口令',
					formType: 1,
					btn: ['确认','取消'], //按钮
					btn2: function(pro_index){
						window.parent.layer.close(pro_index);
						$('#config_form').bootstrapValidator('disableSubmitButtons', false);
					},
					cancel: function(index){
						window.parent.layer.close(pro_index);
						$('#config_form').bootstrapValidator('disableSubmitButtons', false);
					}
				}, function(password, pro_index){
					form.find("input[name='password']").val(hex_sha1(password));
					// 用ajax提交表单
					$.post(form.attr('action'), form.serialize(), function(response) {
						//根据状态显示通知
						if(response.status){
							notify("success",response.message);
							location.href = "{:U('Cash/confirm')}"+'?order='+response.order_no;
						}else{
							notify("error",response.message);
							$('#config_form').bootstrapValidator('disableSubmitButtons', false);
						}
					}, 'json');
					window.parent.layer.close(pro_index);
				});
			}
		});
		$(function() {
			//ICHECK
			$('input').iCheck({
				checkboxClass: 'icheckbox_square-blue',
				radioClass: 'iradio_square-blue',
				increaseArea: '20%' // optional
			});
		});
	</script>
	</body>
</html>